/**
 * 
 */
package com.etown.action;

import nl.captcha.Captcha;
import nl.captcha.servlet.CaptchaServletUtil;

/**
 * @author Administrator
 * 获取验证码信息
 */
@SuppressWarnings("serial")
public class CheckCodeAction extends BaseAction {
	/**
	 * 取得验证码
	 */
	public void getImg() throws Exception
	{
		Captcha captcha = (new nl.captcha.Captcha.Builder(200, 50)).addText().addBackground().addNoise().build();
		CaptchaServletUtil.writeImage(super.response, captcha.getImage());
		getSession().setAttribute("simpleCaptcha", captcha);
	}
}
